import request from "@/utils/request";

export function fetchList(query) {
  return request({
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    url: "/user/api/user/query/page",
    method: "get",
    params: query
  });
}

// 保存设备信息
export function saveInfo(query) {
  return request({
    url: "/user/api/user",
    method: "post",
    data: query
  });
}
// 编辑
export function updateInfo(query) {
  return request({
    url: "/user/api/user",
    method: "put",
    data: query
  });
}
// 设备详细信息
export function fetchDetailInfo(query) {
  return request({
    url: "/device/api/device/query/" + query,
    method: "get"
  });
}
// 导出
export function exportFile(params) {
  return request({
    url: "/device/api/device/exportExcel",
    method: "get"
  });
}
// 下载批量导入模板

export function downloadTemplete(query) {
  return request({
    url: "/minio/minio/outSideChain",
    method: "get",
    params: query
  });
}
// 删除台账
export function deleteDeviceInfo(query) {
  return request({
    url: "/user/api/user/" + query,
    method: "delete"
    // data: query
  });
}
export function resetPwd(query) {
  return request({
    url: "/user/api/user/password/reset/" + query,
    method: "PUT"
    // data: query
  });
}
// 启用
export function startUserInfo(query) {
  return request({
    url: "/user/api/user/start/" + query,
    method: "put"
    // data: query
  });
}
// 停用
export function stopUserInfo(query) {
  return request({
    url: "/user/api/user/stop/" + query,
    method: "put"
    // data: query
  });
}
